{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 🎓 这节课怎么学\n",
    "\n",
    "代码能力要求：**中高**，AI/数学基础要求：**中低**\n",
    "\n",
    "1. 有编程基础的同学\n",
    "   - 体会智能体的实现思路和关键技术\n",
    "2. 没有编程基础的同学\n",
    "   - 体会智能体的表现形态、涉及的技术、价值与意义"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 手撕 AutoGPT\n",
    "\n",
    "这节课直播演示如何从头写一个 AutoGPT。\n",
    "\n",
    "源代码从左边目录树中，右键点击 `autogpt.zip` 下载。如下图：\n",
    "\n",
    "<img src=\"download.png\" width=\"400\" />\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1、功能描述\n",
    "\n",
    "<img src=\"agent-overview.png\" width=\"800\" />\n",
    "\n",
    "设计一个 Agent，自动选择使用以下工具回答用户的问题：\n",
    "\n",
    "- 查看目录下的文件\n",
    "- 基于给定的文档回答用户问题\n",
    "- 查看与分析 Excel 文件\n",
    "- 撰写文档\n",
    "- 调用 Email 客户端发邮件"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2、演示用例\n",
    "\n",
    "实验中使用三个文档演示 Agent 的能力"
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "./data\n",
    " |__2023年8月-9月销售记录.xlsx\n",
    " |__供应商名录.xlsx\n",
    " |__供应商资格要求.pdf"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "文档内容示例\n",
    "\n",
    "<img src=\"doc1.png\" width=\"400\" />\n",
    "\n",
    "<img src=\"doc2.png\" width=\"400\" />\n",
    "\n",
    "<img src=\"doc3.png\" width=\"400\" />"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "测试输入举例\n",
    "\n",
    "- 9月份的销售额是多少\r",
    "- 销售总额最大的产品是什么\n",
    "- 帮我找出销售额不达标的供应商\n",
    "- \n",
    "给这两家供应商发一封邮通知此 \n",
    "- \r\n",
    "对比8月和9月销售情况，写一份报告"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3、核心模块流程图"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img src=\"agent-flowchart.png\" width=\"600\" />"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.19"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
